package dws_tb

import (
	"server/apps/ods/ods_field"
	"server/global"
)


type DwsTb struct {
	ApiId uint `json:"apiId" form:"apiId" gorm:"column:apiId;comment:接口id;"`

	SrcSchema  string `json:"srcSchema" form:"srcSchema" gorm:"column:srcSchema;comment:源库名称;size:100;"`
	SrcTbId    uint   `json:"srcTbId" form:"srcTbId" gorm:"column:srcTbId;comment:源表id;"`
	SrcTbName  string `json:"srcTbName" form:"srcTbName" gorm:"column:srcTbName;comment:源表名称;size:100;"`
	SrcTbBsm   string `json:"srcTbBsm" form:"srcTbBsm" gorm:"column:srcTbBsm;comment:源表标识码;size:100;"`
	SrcTbExist uint   `json:"srcTbExist" form:"srcTbExist" gorm:"-"`

	JoinType   string `json:"joinType" form:"joinType" gorm:"column:joinType;comment:连接方式;size:100;"`
	JoinOn     string `json:"joinOn" form:"joinOn" gorm:"column:joinOn;comment:连接列名;size:100;"`
	JoinOnType string `json:"joinOnType" form:"joinOnType" gorm:"column:joinOnType;comment:连接列类型转换;size:100;"`

	Order int `json:"order" form:"order" gorm:"column:order;comment:源表排序;"`
	Remark string `json:"remark" form:"remark" gorm:"column:remark;comment:备注;size:1000;"`

	SrcFlds []ods_field.OdsDbField `json:"srcFlds" gorm:"-"`
	ColList []string `json:"colList" gorm:"-"`

	CreatedBy uint `gorm:"column:created_by;comment:创建者"`
	UpdatedBy uint `gorm:"column:updated_by;comment:更新者"`
	DeletedBy uint `gorm:"column:deleted_by;comment:删除者"`
	global.BaseModel
}


func (DwsTb) TableName() string {
	return "dws_tb"
}
